/*
 * ===========================================================================================
 * = COPYRIGHT
 *          PAX Computer Technology (Shenzhen) Co., Ltd. PROPRIETARY INFORMATION
 *   This software is supplied under the terms of a license agreement or nondisclosure
 *   agreement with PAX Computer Technology (Shenzhen) Co., Ltd. and may not be copied or
 *   disclosed except in accordance with the terms in that agreement.
 *     Copyright (C) 2023 PAX Computer Technology (Shenzhen) Co., Ltd. All rights reserved.
 * ===========================================================================================
 */

import 'package:flutter/cupertino.dart';
import 'package:pos_link/auto_data_source/auto_batch_request_data_source.dart';
import 'package:pos_link/auto_data_source/auto_device_request_data_source.dart';
import 'package:pos_link/auto_data_source/auto_manage_request_data_source.dart';
import 'package:pos_link/auto_data_source/auto_transaction_request_data_source.dart';
import '../auto_data_source/auto_form_request_data_source.dart';
import '../auto_data_source/auto_payload_request_data_source.dart';
import '../auto_data_source/auto_ped_request_data_source.dart';
import '../auto_data_source/auto_report_request_data_source.dart';
import '../log/dart_log.dart';

class RequestDataBase extends ChangeNotifier {
  List<Map>? _transactionData;
  set setTransactionData(value) {
    _transactionData = value;
  }

  get transactionData {
    if (_transactionData == null) {
      _transactionData = TransactionReqData.initSourceData();
    }
    // Log.v('null screen _transactionData : $_transactionData');
    return _transactionData;
  }

  List<Map>? _manageData;
  set setManageData(value) {
    _manageData = value;
  }

  get manageData {
    if (_manageData == null) {
      _manageData = ManageReqData.initSourceData();
    }
    return _manageData;
  }

  List<Map>? _batchData;
  set setBatchData(value) {
    _batchData = value;
  }

  get batchData {
    if (_batchData == null) {
      _batchData = BatchReqData.initSourceData();
    }
    return _batchData;
  }

  List<Map>? _reportData;
  set setReportData(value) {
    _reportData = value;
  }

  get reportData {
    if (_reportData == null) {
      _reportData = ReportReqData.initSourceData();
    }
    return _reportData;
  }

  List<Map>? _deviceData;
  set setDeviceData(value) {
    _deviceData = value;
  }

  get deviceData {
    if (_deviceData == null) {
      _deviceData = DeviceReqData.initSourceData();
    }
    return _deviceData;
  }

  List<Map>? _formData;
  set setFormData(value) {
    _formData = value;
  }

  get formData {
    if (_formData == null) {
      _formData = FormReqData.initSourceData();
    }
    return _formData;
  }

  List<Map>? _payloadData;
  set setPayloadData(value) {
    _payloadData = value;
  }

  get payloadData {
    if (_payloadData == null) {
      _payloadData = PayloadReqData.initSourceData();
    }
    return _payloadData;
  }

  List<Map>? _pedloadData;
  set setPedData(value) {
    _pedloadData = value;
  }

  get pedData {
    if (_pedloadData == null) {
      _pedloadData = PedReqData.initSourceData();
    }
    return _pedloadData;
  }
}
